/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * The software in this package is published under the terms of the GPL v2.0
 * license, a copy of which has been included with this distribution in the
 * LICENSE-GPL.txt file.
 */

package org.cemantika.exception;

/**
 * LoadKnowledgeSessionException represents the error when the system tries to load a session by
 * the session id, but there is no session persisted with this id.
 * 
 * @author andersonfellipe
 */
public class LoadKnowledgeSessionException extends Exception {

    /**
     * Represents the serial of the {@link Exception}.
     */
    private static final long serialVersionUID = -3690595000768016542L;
    /**
     * Represents the id of the session to be loaded.
     */
    private int sessionId;

    /**
     * Creates a new instance of LoadKnowledgeSessionException.
     * 
     * @param sessionId the id of the session to be loaded.
     */
    public LoadKnowledgeSessionException(int sessionId) {
        this.sessionId = sessionId;
    }

    /*
     * (non-Javadoc)
     * 
     * @see java.lang.Throwable#getMessage()
     */
    @Override
    public String getMessage() {
        return "Could not find a session with the id " + sessionId;
    }

}
